<template>
  <div>
    <div>姓名：{{ name }}</div>
    <div>地址：{{ a }}</div>
    <div>年龄：{{ age }} <button @click="addAge">Add</button></div>
  </div>
</template>
<script lang="ts">
export default {
  name: 'TestVue2',
  data() {
    return {
      name: '张三',
      age: 26,
      a: this.address
    }
  },
  methods: {
    addAge() {
      this.age++
    }
  },
  setup() {
    let address = 'xiamen'
    return { address }
  }
}
</script>

<style lang="scss" scoped></style>
